Response time measurements

Related example macro: Demo-Stopwatch

Web site response time measurement is important.

With the STOPWATCH statements Internet Macros allows you to measure the time that elapses between the first occurrence of this statement in a macro (= stopwatch on) and the second occurrence ( = stopwatch off). By using different id's in the stopwatch command you can create up to a 100 independent measurement points in your macro. You need to insert the STOPWATCH statements manually after you recorded your macro. For accurate measurements it is important to set the browser replay speed to "FAST", so no artificial delays are added.

Example:

VERSION BUILD=303725 
SET !FILESTOPWATCH mydata.csv    
STOPWATCH ID=total

URL GOTO=http://www.iopus.com/iim/iim.htm      
STOPWATCH ID=1 
 
TAG POS=1 TYPE=A ATTR=HREF:http://www.iopus.com/iim-features.htm
STOPWATCH ID=1

STOPWATCH ID=store  
 
TAG POS=1 TYPE=A ATTR=TXT:US$<SP>149   
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:order ATTR=NAME:ORDER_PRODUCT_NOW&&VALUE:Order<SP>Now  
TAG POS=1 TYPE=A ATTR=HREF:http://www.iopus.com/store.htm
STOPWATCH ID=store

STOPWATCH ID=total

The file "mydata.csv" contains the measurement data. By default, the data is saved to the /download directory. The values are comma separated (CSV format) so it can be viewed with any text editor or imported directly in Excel or any other software you use to view your data.

Example file:


Format: Date, Time, Macro name, ID, time (s)

"2002/08/3","11:56:23","mymacro","1","1.272"

"2002/08/3","11:56:32","mymacro","store","8.943"

"2002/08/3","11:56:32","mymacro","total","10.21"


Tips for accurate measurements:

1.Add a CLEAR statement to your macro. This way you make sure that the browser cache is cleared before each run. Otherwise IIM might read the web pages from the cache and not the web server (If the cache is actually used, depends on the Internet Explorer settings.).  
2.Run the measurements as a loop and average several runs. The "internet speed" can fluctuate from minute to minute even on a fast connection. Therefore differences between each measurement are normal. To get stable results, it is good practice to average several runs. For example, EXCEL can create averages automatically for you.  
3. If you compare results between different PC's, please keep in mind that (as with all time critical software) the accuracy depends on the accuracy of the PC clock. Under normal conditions the processor speed should not influence the measured response times, unless the PC is so slow that the web page rendering of the browser and the IIM parsing is slowed down.